{include file="header.html"}
<script type="text/javascript" src="index.php?act=jslang"></script>
<link href="templates/style/colorbox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">

    $(function(){
        $('#rail_define_form').validate({
            errorPlacement: function(error, element){
                $(element).next('.field_notice').hide();
                $(element).after(error);
            },

            onkeyup    : false,
            rules : {
                name : {
                    required: true
                },
                lat:{
                    required: true,
                    number:true
                } ,
                lng:{
                    required: true,
                    number:true
                },
                offset:{
                    required: true,
                    number:true
                }




            },
            messages : {
                name: {
                    required: ''
                },
                lat:{
                    required:'',
                    number:'只能输入数字'
                } ,
                lng:{
                    required:'',
                    number:'只能输入数字'
                },
                offset:{
                    required:'',
                    number:'只能输入数字'
                }



            }
        });
    });
     function mapselect()
     {
         $w=$(window).width();
         $h=$(window).height();

         $("#mapframe").attr("src", "index.php?app=rail_define&act=map_select&lng="+parseFloat($("#lng").val())+"&lat="+parseFloat($("#lat").val()));
         $.colorbox({
             width : "1000px",
             height : "700px",
             inline : true,
             href : "#tagframe"
         });
     }
</script>
<script type="text/javascript" src="templates/js/jquery.colorbox.js" charset="utf-8"></script>
<div style="display: none"  >
    <div id="tagframe">
        <iframe id="mapframe"   width="1000px" height="700px" frameborder="0" scrolling="no" ></iframe>
    </div>
</div>
<div id="rightTop">
    <p>{$lang.rail_define}</p>
    <ul class="subnav">
        <li><a class="btn1" href="index.php?app=rail_define">{$lang.manage}</a></li>
        <!-- {if $rail_define.Id} -->
        <li><a class="btn1" href="index.php?app=rail_define&amp;act=add">{$lang.add}</a></li>
        <!-- {else} -->
        <li><span>{$lang.add}</span></li>
        <!-- {/if} -->
    </ul>
</div>
<div class="info">
    <form method="post" enctype="multipart/form-data" id="rail_define_form">
        <table class="infoTable">

            <tr>
                <th class="paddingT15">{$lang.name}:</th>
                <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="name" type="text" id="name" value="{$rail_define.name|escape}" />

                </td>
            </tr>
            <tr>
                <th class="paddingT15">{$lang.lng}:</th>
                <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="lng" type="text" id="lng" value="{$rail_define.lng}" />
                    <a onclick="mapselect()" href="javascript:;"><img src="../themes/mall/default/styles/default/images/map1.png" ></a>
                </td>

            </tr>
            <tr>
                <th class="paddingT15">{$lang.lat}:</th>
                <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="lat" type="text" id="lat" value="{$rail_define.lat}" />

                </td>

            </tr>


            <tr>
                <th class="paddingT15">{$lang.offset}:</th>
                <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="offset" type="text" id="offset" value="{$rail_define.offset}" />
                单位为米(m)</label>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">{$lang.status}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input name="status" type="radio" value="1" {if $rail_define.status == 1}checked="checked"{/if} />
                    启用</label>
                    <input type="radio" name="status" value="0" {if $rail_define.status == 0}checked="checked"{/if} />
                    停用</label>
                </td>
            </tr>


            <tr>
                <th></th>
                <td class="ptb20"><input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
                    <input class="formbtn" type="reset" name="Reset" value="{$lang.reset}" /></td>
            </tr>
        </table>
    </form>

</div>

{include file="footer.html"}